﻿Public Class times

    Private Sub TextBox6_TextChanged(sender As System.Object, e As System.EventArgs) Handles TextBox6.TextChanged

    End Sub

    Private Sub times_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
        tcclass1.Text = My.Settings.class1
        TextBox7.Text = ""
        TextBox18.Text = ""
        TextBox7.Text = ""
        TextBox24.Text = ""
    End Sub

    Private Sub Timer1_Tick(sender As System.Object, e As System.EventArgs) Handles Timer1.Tick
        Label1.Text = ("Current Time: " + My.Computer.Clock.LocalTime.Hour.ToString + ":" + My.Computer.Clock.LocalTime.Minute.ToString + ":" + My.Computer.Clock.LocalTime.Second.ToString + ":" + My.Computer.Clock.LocalTime.Millisecond.ToString)
    End Sub

    Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click

        My.Settings.class1 = tcclass1.Text
        My.Settings.class2 = TextBox6.Text
        My.Settings.class3 = TextBox5.Text
        My.Settings.class4 = TextBox4.Text
        My.Settings.class5 = TextBox2.Text
        My.Settings.class6 = TextBox3.Text
        Dim tb7 As String
        Dim tb30 As String
        Dim tb8 As String


        Dim tb29 As String
        Dim tb10 As String
        Dim tb28 As String
        Dim tb9 As String
        Dim tb27 As String
        Dim tb12 As String
        Dim tb26 As String
        Dim tb11 As String
        Dim tb25 As String
        If ComboBox1.SelectedItem = "PM" Then    'Class1a
            tb7 = Val(TextBox7.Text) + Val(12)
            tb7 = tb7 + Val(TextBox18.Text)
            My.Settings.t1a = tb7
            My.Settings.Save()
        Else
            tb7 = Val(TextBox7.Text)
            My.Settings.t1a = tb7 + Val(TextBox18.Text)
            My.Settings.Save()
        End If
        If ComboBox12.SelectedItem = "PM" Then    'Class1b
            tb30 = Val(TextBox30.Text) + Val(12)
            tb30 = tb7 + Val(TextBox24.Text)
            My.Settings.t1b = tb30
            My.Settings.Save()
        End If

        If ComboBox1.SelectedItem = "PM" Then    'Class2a
            tb8 = Val(TextBox8.Text) + Val(12)
            tb8 = tb8 + Val(TextBox17.Text)
            My.Settings.t2a = tb8
            My.Settings.Save()
        Else
            tb8 = Val(TextBox8.Text)
            My.Settings.t2a = tb8
            My.Settings.Save()
        End If
        If ComboBox12.SelectedItem = "PM" Then    'Class2b
            tb29 = Val(TextBox29.Text) + Val(12)
            tb29 = tb8 + Val(TextBox23.Text)
            My.Settings.t2b = tb29
            My.Settings.Save()
        End If

        If ComboBox1.SelectedItem = "PM" Then    'Class3a
            tb10 = Val(TextBox10.Text) + Val(12)
            tb10 = tb10 + Val(TextBox16.Text)
            My.Settings.t3a = tb10
            My.Settings.Save()
        Else
            tb10 = Val(TextBox10.Text)
            My.Settings.t3a = tb10
            My.Settings.Save()
        End If
        If ComboBox12.SelectedItem = "PM" Then    'Class3b
            tb28 = Val(TextBox28.Text) + Val(12)
            tb28 = tb10 + Val(TextBox22.Text)
            My.Settings.t3b = tb28
            My.Settings.Save()
        End If

        If ComboBox1.SelectedItem = "PM" Then    'Class4a
            tb9 = Val(TextBox9.Text) + Val(12)
            tb9 = tb9 + Val(TextBox15.Text)
            My.Settings.t4a = tb9
            My.Settings.Save()
        Else
            tb9 = Val(TextBox9.Text)
            My.Settings.t4a = tb9
            My.Settings.Save()
        End If
        If ComboBox12.SelectedItem = "PM" Then    'Class4b
            tb27 = Val(TextBox27.Text) + Val(12)
            tb27 = tb10 + Val(TextBox21.Text)
            My.Settings.t4b = tb27
            My.Settings.Save()
        End If

        If ComboBox1.SelectedItem = "PM" Then    'Class5a
            tb12 = Val(TextBox12.Text) + Val(12)
            tb12 = tb12 + Val(TextBox14.Text)
            My.Settings.t5a = tb12
            My.Settings.Save()
        Else
            tb12 = Val(TextBox12.Text)
            My.Settings.t5a = tb12
            My.Settings.Save()
        End If
        If ComboBox12.SelectedItem = "PM" Then    'Class5b
            tb26 = Val(TextBox26.Text) + Val(12)
            tb26 = tb10 + Val(TextBox20.Text)
            My.Settings.t5b = tb26
            My.Settings.Save()
        End If

        If ComboBox1.SelectedItem = "PM" Then    'Class6a
            tb11 = Val(TextBox11.Text) + Val(12)
            tb11 = tb11 + Val(TextBox13.Text)
            My.Settings.t5a = tb11
            My.Settings.Save()
        Else
            tb12 = Val(TextBox11.Text)
            My.Settings.t5a = tb11
            My.Settings.Save()
        End If
        If ComboBox12.SelectedItem = "PM" Then    'Class6b
            tb25 = Val(TextBox25.Text) + Val(12)
            tb25 = tb10 + Val(TextBox19.Text)
            My.Settings.t5b = tb25
            My.Settings.Save()
        End If
        My.Settings.Save()

    End Sub

End Class